package com.ming_za.odupdaterserver.core.config.type;

import java.util.function.BiConsumer;
import java.util.function.Function;

/**
 * 详情请见{@link ValueType}
 */
public class StringValue extends ValueType<String>{

    public StringValue(String key, Function<String, String> getter, BiConsumer<String, String> setter) {
        super(key, getter, setter);
    }

    public StringValue(String key, String defaultVale, Function<String, String> getter, BiConsumer<String, String> setter) {
        super(key, defaultVale, getter, setter);
    }

    @Override
    protected String valueToObject(String value) {
        return value;
    }

    @Override
    protected String objectToValue(String value) {
        return value;
    }

    @Override
    public String toString() {
        return getValue();
    }
}
